Inspection apparatus, method of controlling the same, and storage medium

ABSTRACT

The present invention provides an inspection apparatus that inspects an image formed on a recording medium by a printing apparatus. The inspection apparatus stores, as a reference image, image data used to form an image on the recording medium, obtains target image data to be inspected, by reading an image to be inspected formed on the recording medium. The inspection apparatus applies noise components to the reference image, aligns the reference image to which the noise components have been applied with the target image data, and performs collation processing between the reference image and the target image data that have been aligned.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to an inspection apparatus, a method ofcontrolling the same, and a storage medium.

Description of the Related Art

Printed products printed by and output from a printing apparatus may besoiled by coloring materials such as ink, toner, or the like adhering tounintended areas. Alternatively, an insufficient amount of coloringmaterial may adhere to areas where an image should be formed, resultingin color omission, where the color is lighter than intended. Suchprinted product defects, such as soiling and color omissions, cause adrop in the quality of the printed product. Therefore, it is necessaryto inspect the printed product for defects and ensure the quality of theprinted product.

Visual inspection, in which an inspector visually inspects for printedproduct defects, requires significant time and incurs significant costs,and thus in recent years, inspection systems have been proposed thatinspect automatically without relying on visual inspections.Specifically, the image quality is determined by aligning a digitalimage used for printing (a reference image) with scanned image dataobtained by scanning the printed product (“scanned image” hereinafter),and executing processing for collating the images to determine whetherthere are any defects.

Japanese Patent Laid-Open No. 2021-43032 describes a method ofperforming an inspection by converting a reference image rendered in theCMYK color space into the RGB color space, which is the same color spaceas that of the scanned image. According to the method disclosed inJapanese Patent Laid-Open No. 2021-43032, the occurrence of erroneousdetections is suppressed by taking into account errors caused by thestate of the scanner, the accuracy of the color conversion, and the likewhen comparing the reference image, which is a digital image, with thescanned image.

However, simply bringing the reference image and the scanned imagecloser to each other through color matching results in erroneousdetections occurring due to noise. This is because whereas the referenceimage is digital data and thus is a uniform image, the scanned image isimage data containing a large amount of noise due to the surfaceproperties, uneven transmittance of the paper, the S/N ratio of thescanner, and the like. Accordingly, when the reference image and thescanned image are compared as-is, differences increase from part topart, resulting in erroneous detections in which defects are detectederroneously.

SUMMARY OF THE INVENTION

Embodiments of the present disclosure eliminate the above-mentionedissues with conventional technology.

A feature of the present disclosure is to provide a technique forsuppressing erroneous detections and improving the inspection precisionwhen collating a reference image and a scanned image to be inspected.

According to a first aspect of embodiments of the present disclosure,there is provided an inspection apparatus that inspects an image formedon a recording medium by a printing apparatus, the inspection apparatuscomprising: one or more controllers including one or more processors andone or more memories, the one or more controllers being configured to:store, as a reference image, image data used to form an image on therecording medium; obtain target image data to be inspected, by readingan image to be inspected formed on the recording medium; apply noisecomponents to the reference image; align the reference image to whichthe noise components have been applied with the target image data; andperform collation processing between the reference image and the targetimage data that have been aligned.

According to a second aspect of embodiments of the present disclosure,there is provided an inspection apparatus that inspects an image formedon a recording medium by a printing apparatus, the inspection apparatuscomprising: one or more controllers including one or more processors andone or more memories, the one or more controllers being configured to:store, as a reference image, image data obtained by scanning an imageformed on the recording medium; obtain target image data to beinspected, the image data being obtained by scanning an image to beinspected formed on the recording medium; align the reference image andthe target image data; and perform collation processing between thereference image and the target image data that have been aligned.

Further features of the present disclosure will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate embodiments of the disclosure and,together with the description, serve to explain the principles of thedisclosure.

FIG. 1 is a diagram illustrating an example of the configuration of aninspection system including an inspection apparatus according to a firstembodiment of the present invention.

FIG. 2 is a block diagram for describing the hardware configuration ofan image forming apparatus according to the first embodiment.

FIG. 3 is a diagram illustrating the configuration of a printer unit ofthe image forming apparatus according to the first embodiment.

FIG. 4A is a schematic diagram illustrating the internal configurationof the inspection apparatus according to the first embodiment.

FIG. 4B depicts a top view of a conveyor belt viewed from an inspectionsensor side.

FIG. 5 is a block diagram for describing the functional configuration ofan inspection controller of the inspection apparatus according to thefirst embodiment.

FIG. 6 is a flowchart for describing inspection processing performed bythe inspection apparatus according to the first embodiment.

FIGS. 7A and 7B are diagrams illustrating an example of a random numbermap according to the first embodiment.

FIG. 8 is a diagram illustrating an example of dividing a referenceimage according to the first embodiment.

FIG. 9 is a diagram illustrating four corner regions of a print outputsheet according to a third embodiment.

FIG. 10 depicts a view illustrating an example of a UI screen displayedin an operation and display unit of the inspection apparatus accordingto the first embodiment.

FIG. 11 is a flowchart for describing collation processing performed bythe inspection apparatus according to the first embodiment.

FIGS. 12A and 12B are schematic diagrams illustrating a proximity searchaccording to the first embodiment.

FIG. 13A is a diagram illustrating an example of a reference imageaccording to embodiments.

FIG. 13B is a diagram illustrating an affine transformation formula.

FIG. 13C is a diagram illustrating an example of a CMYK_to_RGB lookuptable.

FIG. 14A is a diagram illustrating an example of pixel values whenrandom numbers are added to a paper-white part of the reference imageaccording to the first embodiment.

FIG. 14B is a graph illustrating G among the RGB values of an inspectionimage according to the first embodiment.

FIGS. 15A to 15C are graphs illustrating a comparative example of aninspection image and a reference image according to the firstembodiment.

FIG. 16 is a block diagram for describing the functional configurationof an inspection controller of the inspection apparatus according to thethird embodiment.

FIG. 17 is a flowchart for describing status determination processingperformed by the inspection apparatus according to the third embodiment.

DESCRIPTION OF THE EMBODIMENTS

Embodiments of the present disclosure will be described hereinafter indetail, with reference to the accompanying drawings. It is to beunderstood that the following embodiments are not intended to limit theclaims of the present disclosure, and that not all of the combinationsof the aspects that are described according to the following embodimentsare necessarily required with respect to the means to solve the issuesaccording to the present disclosure.

FIG. 1 is a diagram illustrating an example of the configuration of aninspection system including an inspection apparatus according to a firstembodiment of the present invention.

An image forming apparatus (printing apparatus) 100 processes varioustypes of input data, prints onto a recording medium such as paper,sheets, or the like, and generates a printed product. An inspectionapparatus (image processing apparatus) 200 receives the printed productoutput from the image forming apparatus 100 and inspects the content ofthe printed product. A finisher 300 receives the printed productinspected by the inspection apparatus 200 and performs post-processingsuch as book binding, stitching, punching, and the like, for example.The image forming apparatus 100 is connected to an external printserver, a client PC, and the like over a network. The inspectionapparatus 200 is connected to the image forming apparatus 100 one-to-oneby a communication cable. The finisher 300 is also connected to theimage forming apparatus 100 one-to-one by another communication cable.The inspection apparatus 200 and the finisher 300 are also connected toeach other by yet another communication cable. The first embodiment willdescribe an example of an in-line inspection system that performs imageformation, image inspection, and finishing in an integrated manner.

FIG. 2 is a block diagram for describing the hardware configuration ofthe image forming apparatus 100 according to the first embodiment.

The image forming apparatus 100 includes a controller (control unit) 21,a printer unit 206, and a user interface (UI) unit (console unit) 23.Note that the UI unit 23 includes various types of switches, LEDs,indicators, and the like for performing operations.

Image data, document data, and the like transmitted to the image formingapparatus 100 are created by a software application such as a printerdriver (not shown) in a client PC or a print server on a network. Theimage data, document data, and the like are transmitted to the imageforming apparatus 100 as page description language (PDL) data over thenetwork (e.g., a Local Area Network). In the image forming apparatus100, the controller 21 receives the transmitted PDL data.

The controller 21 is connected to the UI unit 23 and the printer unit206, receives the PDL data transmitted from the client PC or the printserver, converts the PDL data into print data that can be processed bythe printer unit 206, and outputs the print data to the printer unit206. The printer unit 206 prints an image based on the print data outputfrom the controller 21. Note that the printer unit 206 according to thefirst embodiment is assumed to have a printing engine using anelectro-photographic method. However, the printing method is not limitedthereto, and the ink jet method may be used instead, for example.

The UI unit 23 is operated by a user, and is used to select variousfunctions and make operation instructions. The UI unit 23 includes adisplay provided with a touch panel on its surface, a keyboard in whichvarious types of keys such as a start key, a stop key, a numericalkeypad, and the like are provided, and the like.

The controller 21 will be described in detail next.

The controller 21 includes a network interface (I/F) unit 101, a CPU102, a RAM 103, a ROM 104, an image processing unit 105, an engine I/Funit 106, and an internal bus 107. The network I/F unit 101 receives thePDL data transmitted from the client PC or the print server over thenetwork. The CPU 102 controls the image forming apparatus 100 as a wholeusing programs, data, and the like stored in the RAM 103, the ROM 104,and the like, and executes the processing performed by the controller 21(described later). The RAM 103 has a work area used by the CPU 102 whenexecuting various types of processing. Programs, data, and the like forcausing the CPU 102 to execute the various types of processing describedlater, settings data for the controller 21, and the like are stored inthe ROM 104.

In accordance with settings from the CPU 102, the image processing unit105 performs image processing for printing on the PDL data received bythe network I/F unit 101, and generates print data that can be output bythe printer unit 206. In particular, the image processing unit 105generates image data having a plurality of color components per pixel byrasterizing the received PDL data. Here, “plurality of color components”refers to independent color components in a color space such as, forexample, RGB (red, green, and blue). The image data has a value of 8bits (256 tones) for each color component in each pixel. In other words,the image data is multivalued bitmap data including multivalued pixeldata. In addition to the image data, the rasterization also generatesattribute data indicating pixel attributes of the image data for eachpixel. This attribute data indicates what type of object the pixelbelongs to, and is a value indicating the type of the object, such astext, a line, a graphic, an image, or a background, for example. Theimage processing unit 105 generates the print data by performing imageprocessing such as color conversion from the RGB color space to the CMYK(cyan, magenta, yellow, and black) color space, screen processing, andthe like using the generated image data and attribute data. The engineI/F unit 106 is an interface that outputs the print data generated bythe image processing unit 105 to the printer unit 206. The internal bus107 is a system bus that connects the aforementioned units to eachother.

FIG. 3 is a diagram illustrating the configuration of the printer unit206 of the image forming apparatus 100 according to the firstembodiment.

The image forming apparatus 100 includes a scanner unit 301, a laserexposure unit 302, photosensitive drums 303, an image forming unit 304,a fixing unit 305, a feed and conveyance unit 306, and a printercontroller 308 that controls these units. The scanner unit 301 appliesillumination to a document placed on a platen and optically reads animage of the document, which is converted into an electrical signal togenerate image data.

The laser exposure unit 302 causes beams of laser light or the likemodulated in accordance with the image data to be incident on a rotatingpolygonal mirror 307 rotating at a constant angular velocity, and eachof the photosensitive drums 303 is irradiated with the resultingreflected each light as scanning light. The image forming unit 304rotationally drives the photosensitive drums 303 and applies anelectrostatic charge thereto using chargers, and develops a latent imageformed on each of the photosensitive drums 303 by the laser exposureunit 302 using toner. This is realized by having a series of fourdeveloping units (developing stations) that each performs a series ofelectrophotographic processes, such as transferring the toner image ontoa sheet and collecting the minute toner that remains in thephotosensitive drums 303 without being transferred at that time.

The four developing units, which are arranged in order of cyan (C),magenta (M), yellow (Y), and black (K), execute image forming operationsin the order of magenta, yellow, and black, after a predetermined amountof time has elapsed since the start of image forming in the cyanstation.

The fixing unit 305 includes a combination of rollers, belts, and thelike, with a heat source such as a halogen heater provided in a heatingroller, which uses heat and pressure to melt and fix the toner image onthe sheet to which the toner image has been transferred by the imageforming unit 304 onto the sheet. Note that when printing on thick paper,the sheet is thick and has poor thermal conductivity, and it istherefore necessary to set the conveyance speed of the sheet passingthrough the fixing unit 305 to, for example, half the normal speed. As aresult, when printing onto thick paper, the conveyance speed of thesheets in the various units other than the fixing unit 305 is alsohalved, and thus the printing speed itself of the image formingapparatus 100 is halved.

The feed and conveyance unit 306 includes at least one sheet repository,such as a sheet cassette or a paper tray, and in response to aninstruction from the printer controller 308, the feed and conveyanceunit 306 separates a single sheet from a plurality of sheets stored inthe sheet repository and transports that sheet to the image forming unit304. The sheet onto which the toner image has been transferred by theimage forming unit 304 is furthermore conveyed to the fixing unit 305.In this manner, the sheet is conveyed, and the aforementioned developingstations transfer the toner images of each color, resulting in afull-color toner image ultimately being formed on the sheet. When animage is to be formed on both sides of the sheet, control is performedsuch that the sheet that has passed through the fixing unit 305 alsopasses through a conveyance path that conveys the sheet to the imageforming unit 304 a second time.

The printer controller 308 communicates with the controller 21, whichcontrols the image forming apparatus 100 as a whole, and executescontrol in response to instructions therefrom. The printer controller308 also manages the states of the abovementioned scanner, laserexposure, image forming, fixing, and feed and conveyance units, andissues instructions such that the units can operate smoothly in harmonywith one another.

FIG. 4A is a schematic diagram illustrating the internal configurationof the inspection apparatus 200 according to the first embodiment.

A sheet printed onto and discharged by the image forming apparatus 100(a printed product) is taken into the inspection apparatus 200 by feedrollers 401. The printed product is then conveyed by a conveyor belt 402and read by an inspection sensor 403 located above the conveyor belt402. An inspection controller 405 performs inspection processing usingthe image data (a scanned image (an inspection image)) read by theinspection sensor 403. The inspection controller 405 also controls theinspection apparatus 200 as a whole. An inspection result from thisinspection processing is sent to the finisher 300, which is in a laterstage. The printed product that has been inspected in this manner isdischarged by discharge rollers 404. Although not shown here, theinspection sensor 403 may have a structure that reads from the undersideof the conveyor belt 402 as well so as to be capable of handlingdouble-sided printed products.

FIG. 4B depicts a top view of the conveyor belt 402 viewed from theinspection sensor 403 side.

Here, the inspection sensor 403 is a line sensor that reads, on aline-by-line basis, an image of the entirety of a printed product 410that has been conveyed, as illustrated in the drawing. An illuminationdevice 411 for reading images irradiates the printed product whenreading using the inspection sensor 403. An illumination device 412 fordetecting skew is used to detect whether the printed product 410 isskewed with respect to the conveyance direction during conveyance by theconveyor belt 402. The illumination device 412 for detecting skew readsan image of a shadow at an edge of the conveyed printed product 410 anddetects skew by illuminating the printed product 410 from an obliquedirection. In the first embodiment, the reading of the shadow image atthe edge of the printed product is performed by the inspection sensor403, but may be performed by another reading sensor aside from theinspection sensor 403.

FIG. 5 is a block diagram for describing the functional configuration ofthe inspection controller 405 of the inspection apparatus 200 accordingto the first embodiment.

All of the control by the inspection controller 405 is performed by acontrol unit 503. The control unit 503 includes a CPU 515, and the CPU515 executes various types of processing (described later) by executingprograms loaded into a memory unit 504. An image input unit 501 receivesthe scanned image data to be inspected, which has been read and obtainedby the inspection sensor 403 (“scanner image” or “inspection image”hereinafter). The CPU 515 saves the received scanned image in the memoryunit 504. A communication unit 502 communicates with the controller 21of the image forming apparatus 100. This communication includesreceiving image data corresponding to the scanned image and used forprinting (reference image data), and transmitting and receivinginspection control information. The CPU 515 also saves the receivedreference image data (“reference image” hereinafter) and inspectioncontrol information in the memory unit 504.

One of the pieces of inspection control information exchanged with theimage forming apparatus 100 is synchronization information for achievingcorrespondence between the scanned image and the reference image, suchas print job information, print copy number information, page orderinformation, and the like. Another piece of the inspection controlinformation includes inspection result information and controlinformation for controlling the operations of the image formingapparatus 100 in accordance therewith. The synchronization informationis necessary for synchronizing the reference image and the scanned imagefor cases where the order in which the scanned image, and the referenceimage used to print the scanned image, are received by the inspectioncontroller 405 in a different order for double-sided printing, printingmultiple copies, or the like. Furthermore, because a single referenceimage may correspond to a plurality of scanned images, thesynchronization information is required for synchronizing the referenceimage with the scanned images. The inspection control informationexchanged with the finisher 300 includes inspection result informationand control information that controls the operations of the finisher 300in accordance therewith.

The operations of an inspection processing module 513 are controlled bythe CPU 515 of the control unit 503. Based on the synchronizationinformation, which is one piece of the inspection control informationexchanged with the image forming apparatus 100 as described above, thecontrol unit 503 sequentially performs the inspection processing on thecorresponding inspection image and reference image pair using theinspection processing module 513. The inspection processing module 513will be described in detail later.

When the inspection processing ends, the result of the determination issent to the control unit 503 and displayed in an operation and displayunit 505. When the determination result indicates a defect, the controlof the image forming apparatus 100 and the finisher 300 is switchedthrough the communication unit 502 using a method specified in advanceby the user through the operation and display unit 505. For example,processing such as stopping the image forming processing performed bythe image forming apparatus 100 and switching the discharge tray of thefinisher 300 to an escape tray is performed.

The configuration of the inspection processing module 513 will bedescribed next.

A skew detection module 506 is a module that detects the angle of skewin the scanned image. As described earlier with reference to FIG. 4B,the scanned image is scanned such that a shadow appears at the edge ofthe printed product. This is because the inspection sensor 403 scans theprinted product, which is drawn into the inspection apparatus 200 andconveyed on the conveyor belt 402, for a shadow at the edge producedwhen illuminated by the illumination device 412 for detecting skew. Thisshadow is used to detect the angle of skew in the printed product.Correction processing is performed by an image deforming module 509(described later) based on the angle of skew detected in this manner.

A color conversion module 507 is a module that performs color conversionbetween the scanned image and the reference image. The reference imageis image data rasterized in the CMYK color space by the image processingunit 105 of the image forming apparatus 100, and the scanned image isimage data in the RGB color space obtained through the reading by theinspection sensor 403. The color conversion module 507 converts thereference image into an RGB image. A CMYK_to_RGB lookup table (a tablefor converting from CMYK to RGB), such as that illustrated in FIG. 13C,may be used for the conversion, for example.

In this case, the pixel data at a grid point is color-converted to RGBby referring to this conversion table, but the pixel data not at a gridpoint is interpolated from the adjacent grid points to obtain the RGBvalue.

FIG. 13A depicts a view illustrating an example of the reference image.

A region 1301 is a non-printing section (“paper white” hereinafter) inthe reference image, and indicates a pixel region which isone-dimensional on the X-axis. The X coordinates of the region 1301 aretaken as 0 to N. Because the region 1301 is paper white, all of thepixels in the region 1301 have CMYK values of (0, 0, 0, 0), and whenconverted by the color conversion module 507 using the above-describedCMYK to RGB conversion table, the resulting RGB values are (220, 220,220). Note that the RGB values are 8-bit values from 0 to 255, and thusthe RGB values are converted into (220, 220, 220) so as not to besaturated during random number addition (described later). The colorconversion may also use a CMYK to RGB conversion table that takes intoaccount results from a random number application module 511 (describedlater).

A resolution conversion module 508 is a module that performs resolutionconversion such that the scanned image and the reference image have thesame resolution. The resolution of the scanned image and the referenceimage may differ at the point in time when those images are input to theinspection controller 405. Furthermore, there are cases where theresolution used in the modules of the inspection processing module 513and the input resolution are different. In such a case, the resolutionis converted by this module. For example, assume that the scanned imageis 600 dpi for the main scan and 300 dpi for the sub scan, and thereference image is 1200 dpi for the main scan and 1200 dpi for the subscan. If the resolution required by the inspection processing module 513is 300 dpi for both the main scan and the sub scan, the respectiveimages are reduced/magnified, and both images are set to 300 dpi forboth the main scan and the sub scan. A publicly-known method may be usedfor this magnification method, taking into account the computationalload and the required precision. For example, if the SINC function isused to change the magnification, the computational load is heavy but ahigh-precision magnification result can be obtained. Meanwhile, if thenearest neighbor method is used, the computational load is light but alow-precision magnification result is obtained.

The image deforming module 509 is a module that deforms the scannedimage, the reference image, or the like. There are geometric differencesbetween the scanned image and the reference image due to stretching andcontraction of the paper and skew during printing, skew during scanning,and the like. The image deforming module 509 corrects the geometricdifferences by deforming the image based on the information obtained bythe skew detection module 506, an alignment module 510 (describedlater), and the like. For example, the geometric differences are lineartransformations (rotation, scaling, shearing) and parallel movement.These geometric differences can be expressed as affine transformations,and correction can be performed by obtaining affine transformationparameters from the skew detection module 506, the alignment module 510,and the like. Note that the information obtained from the skew detectionmodule 506 is only parameters pertaining to rotation (angle of skewinformation).

The alignment module 510 is a module that aligns the scanned image andthe reference image. It is assumed that the scanned image and thereference image input to this module are images of the same resolution.Note that the higher the input resolution is, the better the accuracy ofthe alignment is, but the computational load increases. An inspectionimage and a reference image used by a collation module 512 (describedlater) can be obtained by the image deforming module 509 performingcorrections based on the parameters obtained through the alignment.Various alignment methods are conceivable as the alignment method, butin the first embodiment, in order to reduce the computational load, amethod for performing alignment on the entire image using informationfrom a partial region of the image, instead of from the entire image, isused. The alignment according to the first embodiment includes threesteps, namely selecting an alignment patch, performing alignment foreach patch, and estimating the parameters of the affine transformation.The following will describe each of the steps.

Selecting an alignment patch will be described first. Here, “patch”refers to a quadrangular region within the image. When selecting analignment patch, a plurality of patches suited to alignment are selectedfrom the reference image. A patch having a large corner feature amountwithin the patch can be considered as a patch suited to alignment. A“corner feature” is a feature in which two distinct edges in differentdirections are present locally in the vicinity of each other (anintersection between two edges). The corner feature amount is a featureamount indicating the strength of the edge feature. Various methods havebeen proposed based on differences in the modeling of “edge features”.

A publicly-known method called the “Harris corner detection method”, forexample, is one such method for calculating the corner feature amount.The Harris corner detection method calculates a corner feature amountimage from a horizontal direction differential image (a horizontaldirection edge feature amount image) and a vertical directiondifferential image (a vertical direction edge feature amount image).This corner feature amount image is an image expressing the edge amountof the weaker of the two edges that constitute the corner feature. Acorner feature is expected to be a strong edge for both edges, so evenif the edge is relatively weak, the magnitude of the corner featureamount is expressed by whether a strong edge amount is present.

The corner feature amount image is calculated based on the referenceimage, and a part having a large corner feature amount is selected as apatch suited to alignment. If a region having a large corner featureamount is simply selected in sequence as a patch, there are cases wherethe patches will be selected only from a biased region. In such a case,the number of regions where no patches are present in the peripheryincreases, and thus image deformation information of that region cannotbe used, which means the state is not suited to alignment for the entireimage. Accordingly, when selecting a patch, it is taken into accountthat the patches are distributed throughout the image, instead of simplyconsidering the corner feature amount. Specifically, even if the cornerfeature amount of a given patch candidate region is not large withrespect to the entirety of the image, if the value in the local regionof the image is large, the patch is selected. Doing so makes it possibleto distribute the patches throughout the reference image. The size ofthe patch, the number of patches (or the density), and the like are usedas parameters in the patch selection. As patches increase in size andthe number of patches increases, the accuracy of the alignment improves,but the computational load increases.

The alignment for each patch will be described next. The alignment foreach patch is performed between the alignment patch in the referenceimage selected in the previous stage and a patch in the correspondingscanned image.

Two types of information are obtained as a result of the alignment, thefirst being central coordinates (refpX_i, refpY_i) of the alignmentpatch at an i-th position in the reference image (where i=1 to N, and Nis the number of patches). The second is a position of those centralcoordinates (scanpX_i, scanpY_i) within the scanned image. The alignmentmethod may be any shift amount estimation method capable of obtainingthe relationship between (refpX_i, refpY_i) and (scanpX_i, scanpY_i).For example, a method is conceivable in which the alignment patch andthe corresponding patch are carried over to the frequency space using aFast Fourier Transform (FFT), the correlation therebetween is found, andthe shift amount is estimated.

Finally, estimation of affine transformation parameters will bedescribed. Affine transformation is a coordinate conversion methodexpressed by the formula indicated in FIG. 13B.

In this formula, there are six types of affine transformationparameters, namely a, b, c, d, e, and f Here, (x, y) corresponds to(refpX_i, refpY_i), and (x′, y′) corresponds to (scanpX_i, scanpY_i).This correspondence relationship, obtained from N patches, is used toestimate the affine transformation parameters. For example, the affinetransformation parameters can be obtained using the least-squaresmethod. Based on the affine transformation parameters obtained in thismanner, post-alignment correction image data is generated by deformingthe reference image or the scanned image using the image deformingmodule 509. A set of the reference image and the inspection image(scanned image) used for collating in the collation module 512 cantherefore be obtained.

The random number application module 511 is a module that applies randomnumbers to the reference image. The random numbers applied are foradjusting the image differences between the scanned image and thereference image, and even when there are no defects, there aredifferences between the scanned image and the reference image. Thesedifferences arise due to the influence of the characteristics of theimage forming apparatus, the influence of scanner characteristics, andthe like. The characteristics of the image forming apparatus includecolor reproducibility, dot gain, gamma characteristics, and the like.The scanner characteristics include color reproducibility, S/N ratio,scanner MTF, and the like. For the color reproducibility of the imageforming apparatus, the scanner, and the like, the differences areeliminated by the color conversion module 507. To do so, the randomnumber application module 511 applies random numbers to the referenceimage in order to remove differences in other noise parts. A flow inwhich, for example, a random number pattern i-th in the horizontaldirection and j-th in the vertical direction for a 9×9 size, asillustrated in FIGS. 7A and 7B, is applied to each of regions of thereference image divided as illustrated in FIG. 8 , will be described asan example.

FIGS. 7A and 7B are diagrams illustrating an example of a random numbermap according to the first embodiment. FIG. 8 is a diagram illustratingan example of dividing the reference image according to the embodiment.

As illustrated in FIG. 8 , a reference image 801 having 45 verticalpixels (hereinafter, pixel=px) and 45 horizontal pxs is divided into aplurality of regions having the same size as the random number pattern.The application of random numbers will be described here using a region802 illustrated in FIG. 8 as an example. The image of this region 802 isa coordinate system from the upper-left origin (0, 0). Random numbersare added to this image by applying a random number pattern 701illustrated in FIG. 7A. The random numbers added here are the randomnumbers at coordinates (i, j) of the random number pattern 701corresponding to the pixel coordinate positions. For example, when thepixel corresponding to coordinates (1, 0) is assumed to have RGB values(100, 101, 102), the random numbers added thereto are random numbers atcoordinates (i=1, j=0) of the random number pattern 701. In the examplein FIG. 7A, the random number at coordinates (1, 0) is “1”, and thus “1”is added to each of the RGB values. By similarly applying random numbersto the entire reference image, the random numbers can be applied to eachregion of the divided reference image.

Likewise, random numbers can be applied to the entire scanned image bydividing the scanned image into a plurality of regions and performingsimilar processing on all of the regions of the divided scanned image.

Here, small changes to the magnitude of the random numbers produceeffects. In the first embodiment, the random numbers are changed between0 and 2, but when the pixel values can be calculated in decimalincrements in the internal processing, the pixel values may be changedin decimal increments of 0 to 1. Here, it is necessary to apply amagnitude or noise of a luminance that is not detected as a defect.

Although the first embodiment describes an example in which a randomnumber greater than or equal to 0 is applied, the present invention isnot limited thereto. For example, a positive and negative value centeredon 0 may be used, or a random number may be subtracted rather thanadded.

Although the random number pattern is not particularly limited, it isdesirable that a random number pattern that includes noise and a randomnumber pattern that does not include noise be included in the windowsize used for block matching through a proximity search (describedlater). Taking the random number map 701 illustrated in FIG. 7A as anexample, “0”, where no noise is included in the window, and “1” or “2”,where noise is included, are included in any pixel of interest. Notethat the random number pattern is not limited thereto, and a randomnumber pattern may be provided for each RGB value, for example.

An example of the application of random numbers will be described hereusing the reference image illustrated in FIG. 13A as an example.

The RGB values of the region 1301 are as converted by the colorconversion module 507 (220, 220, 220). This one-dimensional region isexpressed as coordinates (X, 0) (X is 0 to 8), and the random numberpattern 701 is added to the pixels corresponding to each coordinate. Theresult of the addition is shown in FIG. 14A, as a graph 1401. Thevertical axis of the graph 1401 represents each RGB pixel value, and thehorizontal axis represents the X coordinate. The graph 1401 shows anexample in which the random numbers in the first row (j=0) of thepattern 701 illustrated in FIG. 7A have been added. In the referenceimage, it can be seen that paper white is always a constant pixel value,but fluctuates as a result of adding the random numbers.

Returning again to FIG. 5 , the collation module 512 is a module forcollating the inspection image (scanned image) and the reference image.The inspection image and the reference image input to this module areimage data of the same resolution. In addition, it is assumed that thereference image or the inspection image has been corrected by the imagedeforming module 509 based on the information obtained by the alignmentmodule 510, such that the images can be compared.

The collation module 512 generates a collation image using the referenceimage to which the random numbers have been applied by the random numberapplication module 511 and the inspection image. Here, when generatingthe collation image, it is possible to detect defects with highprecision by further aligning the positions with high precision based onthe information obtained by the alignment module 510. In the firstembodiment, high-precision alignment is realized by block matchingthrough a proximity search. The collation processing is performed basedon parameters communicated from the operation and display unit 505.Details of the collation processing will be given later. Note thathigh-precision alignment is not limited to block matching. Finealignment may be performed in a narrow region based on the informationobtained by the alignment module 510, and thus the alignment maytherefore be feature point alignment in a local region or the like.

The operation and display unit 505 is a touch screen user interface, andaccepts, from the user, the settings for the processing performed by theinspection processing module 513. For example, the operation and displayunit 505 displays the settings screen illustrated in FIG. 10 , andaccepts settings for the image processing performed by the inspectionprocessing module 513 from the user.

FIG. 10 depicts a view illustrating an example of a UI screen displayedin the operation and display unit 505 of the inspection apparatus 200according to the first embodiment.

Here, settings 1 to 5 are set as inspection settings that can beadjusted by the user. For example, when setting 1 is set, the collationmodule 512 determines there is a defect when a color difference ofsoiling, scratches, or the like determined by the inspection of theinspection image is greater than or equal to “5”. On the other hand,when setting 5 is set, the collation module 512 determines there is adefect when a color difference of soiling, scratches, or the likedetermined by the inspection of the inspection image is greater than orequal to “50”. In the example in FIG. 10 , the lower the setting numberof the inspection settings are, the more likely the collation module 512is to determine a defect for color differences caused by small amountsof soiling, slight scratches, and the like. In this manner, the user canset a threshold at which the collation module 512 determines a defect ispresent by selecting one of the setting buttons, from setting 1 tosetting 5, and pressing the “apply” button. Calculating the colordifference will be described in detail later with reference to collationdetermination processing. Note that in the example in FIG. 10 , thecolor difference parameters are associated in advance with respectivesetting values. Accordingly, the color difference parameterscorresponding to the setting values selected by the user arecommunicated to the collation module 512 by the operation and displayunit 505.

In the first embodiment, the color difference of the detected soilingand scratches is adjusted based on the setting value indicated in FIG.10 , but the configuration is not limited thereto, and the size of thedetected soiling and scratches may be set instead, for example. Forexample, the size may be set to a range of 0.1 mm to 3 mm or the like.

The inspection processing performed by the inspection apparatus 200according to the first embodiment will be described next.

FIG. 6 is a flowchart for describing the inspection processing performedby the inspection apparatus 200 according to the first embodiment. Theprocessing described in this flowchart is realized by the CPU 515 of thecontrol unit 503 executing programs stored in the memory unit 504. Atthis time, the CPU 515 functions as the respective processing modules ofthe inspection processing module 513 illustrated in FIG. 5 , and theresults of the processing are held by the memory unit 504 and used insubsequent processing.

First, in step S601, the CPU 515 performs preprocessing of theinspection processing. At this time, the CPU 515 selects the pair of thescanned image and the reference image to be processed using theinspection control information received from the image forming apparatus100, which is held in the memory unit 504, via the communication unit502. The CPU 515 then processes the scanned image using the skewdetection module 506, and obtains skew information of the scanned image.Then, based on the skew information, the image deforming module 509performs correction processing on the scanned image. By performing theaforementioned processing for generating the reference image in parallelwith this, the reference image is taken as an image suited to theinspection processing by the color conversion module 507.

The processing then proceeds to step S602, where the CPU 515 performsalignment using the scanned image and the reference image obtained instep S601. At this time, the CPU 515 converts the scanned image and thereference image to a predetermined resolution (e.g., 300 dpi×300 dpi)using the resolution conversion module 508. The scanned image and thereference image, which are now in the predetermined resolution, are thenprocessed by the alignment module 510 to obtain the affinetransformation parameters. Then, using the affine transformationparameters obtained from the alignment module 510, the CPU 515 performsthe correction processing on the reference image using the imagedeforming module 509, sets the coordinate system of the reference imageto be the same as the scanned image such that the image can be used forcollation.

The processing then proceeds to step S603, where the CPU 515 performscollation/determination processing using the inspection image (thescanned image) and the reference image obtained in step S602. At thistime, the CPU 515 functions as the collation module 512, and collatesthe inspection image with the reference image. The processing thenproceeds to step S604, where the CPU 515 displays a result of thecollation processing performed in step S603 in the operation and displayunit 505. Here, simply displaying an image indicating a finaldetermination result makes it difficult to know what kind of imagedefect occurred, and thus an image indicating the final determinationresults is composited with the inspection image and displayed in theoperation and display unit 505. This compositing may be use anycompositing method as long as it is a compositing method in which thelocation of the image defect is easy to ascertain. For example, a part(defective part) determined to be “1” in the image indicating the finaldetermination results may be displayed by being set to red andsuperimposed on the inspection image.

The collation processing will be described next with reference to theflowchart illustrated in FIG. 11 .

FIG. 11 is a flowchart for describing the collation processing performedby the inspection apparatus 200 according to the first embodiment. Theprocessing illustrated in this flowchart is realized by the CPU 515 ofthe control unit 503 executing programs stored in the memory unit 504.At this time, the CPU 515 functions as the collation module 512illustrated in FIG. 5 .

First, in step S1101, the collation module 512 performs high-precisionalignment through the proximity search in the reference image and theinspection image. Although the reference image and the inspection imageare aligned by the image deforming module 509 as described earlier, itis necessary to perform further local alignment in order to detectdefects with high precision. Accordingly, in the first embodiment,high-precision alignment is performed through a proximity search usingblock matching. Here, schematic diagrams illustrating the time of theproximity search are provided.

FIGS. 12A and 12B are schematic diagrams illustrating the proximitysearch according to the first embodiment.

FIG. 12A illustrates an example of an inspection image, and FIG. 12Billustrates an example of a reference image. An area 1201 (apredetermined region) of the reference image indicates a search regionfor the reference image. A search window 1202 of the inspection imageuses the eight neighboring pixels of a pixel 1203 as a target region. Asearch window 1204 corresponding to the search window 1202 is then setin the area 1201 of the reference image. The search window 1204 is thenmoved to the right by four pixels in the area 1201 (x+4), and when thesearch window 1204 reaches the right end of the area 1201, thex-coordinate is returned to its original state, the y-coordinate ischanged to −4, and the search window 1204 is moved to a positiondirectly below the first position of the search window 1204. Thisoperation is repeated, such that in this area 1201, a region of thereference image that has the least different from the search window 1202in the inspection image is searched out in sequence. A difference Δareaobtained here is the total value of the target region for a colordifference ΔRGB indicated by the following Formula (1).

ΔRGB=√{square root over (R ² +G ² +B ²)}  Formula (1)

Here, a difference between a case where random numbers have been appliedby the random number application module 511 and a case where randomnumbers have not been applied will be described.

The region 1301 of the reference image illustrated in FIG. 13A is paperwhite, which has been described as RGB (220, 220, 220) in theexplanation of the color conversion module 507. When block matchingthrough the proximity search is performed in this region 1301, only thepixels in the paper white region are not assigned a superiority orinferiority. On the other hand, when random numbers have been applied,the maximum value and the minimum value of Δarea change according toeach search window region. Then, in the block matching through theproximity search, the part having the minimum value in the search windowregion is selected. Accordingly, the alignment can be performed with ahigher level of precision when random numbers are applied to thereference image.

The processing then proceeds to step S1102, where the collation module512 calculates a differential image between the reference image and theinspection image, which have been re-aligned in step S1101. The firstembodiment takes a color difference ΔG, which is the difference for G inRGB, as the color difference for detecting a defect, and will describean example in which this color difference is calculated. Although ΔG,which is the difference for G in the RGB values, is taken as the colordifference in the first embodiment, defects may be detected using theΔRGB as the color difference.

In addition, for a grayscale image, simple absolute value of thedifference may be used, or a function for obtaining the absolute valueof the difference taking into account gamma characteristics may be used.

FIG. 14B shows a graph 1402 in which G is indicated among the RGB valuesof the inspection image. The vertical axis of this graph represents theG pixel value, and the horizontal axis represents the X coordinate. Notethat the X coordinates described here are a one-dimensional region ofthe inspection image at the same position as in the reference imageillustrated in FIG. 13A, and are assumed to contain no defects but tocontain noise.

FIGS. 15A to 15C are diagrams illustrating graphs of the reference imageand the inspection image according to the first embodiment.

In FIGS. 15A to 15C, the solid lines represent G for the same inspectionimage as in FIG. 14B, and the broken lines represent the referenceimage. In FIGS. 15A to 15C, the vertical axes of the graphs representthe G pixel value, and the horizontal axes represent the X coordinate.FIG. 15A shows a case where no noise has been added to the referenceimage. FIG. 15B illustrates a case where the result of adding the randomnumber pattern 701 to the reference image is compared to a graph 1402 ofG in the inspection image shown in FIG. 14B, as illustrated in FIG. 14A.FIG. 15C shows a comparative example between an inspection image and areference image when alignment is performed through the proximity searchusing the collation module 512.

In FIG. 15A, ΔG is further away by at least 5 at the X coordinatepositions 4 and 5. At this time, as illustrated in FIG. 10 describedabove, when the inspection settings set through the operation anddisplay unit 505 are the setting 1, ΔG being at least “5” is taken as adefect and is therefore an erroneous detection.

In FIG. 15B, as in FIG. 15A, the difference is at least 5 at the Xcoordinate positions 4 and 5, and thus erroneous detections occur forthe setting 1.

On the other hand, in FIG. 15C, the difference which is the most distantis “4” at the X coordinate position 2, and thus a defect is not detectedhere, even with setting 1 described above.

As described above, the aforementioned processing and the processingperformed by the random number application module 511 would originallycause erroneous detections to occur due to noise contained in theinspection image. However, by locally aligning the inspection image andthe reference image through the proximity search in a state where randomnumbers have been applied to the reference image too, the collationdetermination processing can be performed in a state where noise presentin the inspection image has been eliminated, making it possible tosuppress erroneous detections.

Note that the random numbers to be applied may be changed in accordancewith the inspection settings based on the parameters communicated fromthe operation and display unit 505. Specifically, a table may beprovided so as to increase the random numbers (noise amount) to beapplied when the inspection setting is high (large), and to reduce therandom numbers (noise amount) to be applied when the inspection settingis low (small), and may be switched according to the inspectionsettings.

A random number pattern 702 illustrated in FIG. 7B is an example of therandom number pattern when the inspection settings have been increasedby one. When the inspection settings increase in this manner, the tableis switched to one in which the random numbers (noise amount) areincreased. This is because the effect of suppressing erroneousdetections can be further enhanced by changing the values of the randomnumbers to be applied in a range of magnitudes and luminances notdetected as defects.

Variation on First Embodiment

Image processing pertaining to a variation on the first embodiment ofthe present invention will be described hereinafter.

The foregoing first embodiment described an example in which a referenceimage is a digital image used in printing, and the collation is mademore precise by canceling the noise components in the inspection imageand the reference image. However, in the inspection system, there arealso cases where in addition to using a digital image for the referenceimage, a scanned image, obtained by printing and scanning in the samemanner as the inspection image and having the user determine that thereis no defect, is used as a reference image.

When a scanned image is taken as the reference image, the scanned imagecontains noise due to unevenness in the surface properties,transmittance, and the like of the paper, the S/N ratio of the scanner,and the like. It is therefore not necessary to apply random numbers.Accordingly, when the scanned image is to be used as the referenceimage, the random number application module 511 is switched so as not toapply random numbers.

As described above, according to this variation, even when the referenceimage is a digital image used for printing, the collation processingdetermination can be performed in a state where noise components arecanceled out even when the reference image is, like the inspectionimage, a scanned image obtained by scanning a printed product. Thismakes it possible to suppress erroneously detecting defects in theinspection image.

Second Embodiment

Image processing pertaining to a second embodiment of the presentinvention will be described hereinafter.

The foregoing first embodiment described a method in which a noisecomponent present in an inspection image is canceled out by applyingrandom numbers to the reference image, and a suitable collationdetermination is then made.

In the first embodiment, when applying the random numbers, the randomnumbers are applied in accordance with the random number mapsillustrated in FIGS. 7A and 7B, regardless of the pixel value of thepixel of interest. However, the noise contained in the inspection imageis greater in the paper white parts, highlight parts, and the like thanin dark parts. This is because the inspection sensor 403 is an RGBlight-receiving device, and thus the sensitivity is higher in highlightparts.

Accordingly, in the second embodiment, the values of the random numbersapplied are changed in accordance with the pixel values. This makes itpossible to apply more suitable random numbers to various parts, such asthe dark parts, paper white parts, and the highlight parts, which leadsto the suppression of erroneous detections. Note that only differencesfrom the first embodiment will be described hereinafter. The systemconfiguration, the hardware configurations of the image formingapparatus 100 and the inspection apparatus 200, and so on according tothe second embodiment are the same as those described above in the firstembodiment, and will therefore not be described.

The random number application module 511 according to the secondembodiment applies suitable random numbers by referring to the pixelvalues of the reference image and multiplying coefficients based on thepixel values by the random numbers to be applied.

Like the first embodiment, descriptions will be given using the imageregion 802 of the reference image illustrated in FIG. 8 . When thecoordinate (2, 0) is RGB values (0, 96, 192), the random number patternadds i=2 and j=0. Here, the following Formula (2) shows an example ofthe calculation of R′, in which a random number value rand of the randomnumber pattern (i, j) is applied to a coefficient D of dark parts, acoefficient H for paper white parts, and R of the RGB values at thecoordinate (2, 0). In the following Formula (2), the random number addedincreases with proximity to paper white, and decreases with proximity todark parts. This makes it possible to apply high (large) random numbersto pixels in bright parts susceptible to noise, such as paper white orhighlights, and low (small) random numbers to pixels that are lesssusceptible to noise, such as dark parts.

R′=(((H−D)*R)÷255+D)*rand+R  (Formula 2)

According to this formula, when R=0, D=1, and H=5, rand is “2” and R′becomes 10. Calculating for G and B in the same manner makes it possibleto apply suitable random numbers having referred to the pixel values ofthe reference image.

Although the random numbers are obtained through a linear arithmeticformula in the random number application, the present invention is notlimited thereto. The random numbers may be obtained by referring to alookup table corresponding to the pixel values.

As described above, according to the second embodiment, changing thevalues of the random numbers assigned in accordance with the pixelvalues of the reference image makes it possible to assign more suitablerandom numbers to various parts, such as dark parts, paper white parts,or highlight parts, which has an effect of suppressing erroneousdetections.

Third Embodiment

Processing pertaining to a third embodiment of the present inventionwill be described hereinafter.

The foregoing first embodiment described a method in which a noisecomponent present in an inspection image is canceled out by applyingrandom numbers to the reference image, and a suitable collationdetermination is then made. In the first embodiment, when the randomnumbers are applied, random numbers set in advance are applied. However,the amount, distribution, and the like of the noise change depending onindividual differences between print output sheets 410, inspectionsensors 403, and the like. Accordingly, the third embodiment willdescribe an example in which random numbers are applied taking intoaccount individual differences between print output sheets 410,inspection sensors 403, and the like. Note that only differences fromthe first embodiment will be described hereinafter. The systemconfiguration, the hardware configurations of the image formingapparatus 100 and the inspection apparatus 200, and so on according tothe third embodiment are the same as those described above in the firstembodiment, and will therefore not be described.

FIG. 16 is a block diagram for describing the functional configurationof an inspection controller of an inspection apparatus according to thethird embodiment. Note that in FIG. 16 , the same reference numerals aregiven to parts having the same configuration as those shown in theaforementioned FIG. 5 , and descriptions thereof will be omitted.

The inspection processing module 513 according to the third embodimentincludes a status determination module 514 for determining the status ofthe print output sheet 410, the inspection sensor 403, and the like. Thestatus determination module 514 executes printing processing withoutprinting anything onto the print output sheet 410, and measures theamount of noise by reading the print output sheet 410 using theinspection sensor 403. In the inspection sensor 403, four corner regionsof the print output sheet 410, such as those illustrated in FIG. 9 , areread, and the values thereof are sent to the status determination module514.

FIG. 9 is a diagram illustrating the four corner regions of the printoutput sheet 410 according to the third embodiment.

FIG. 17 is a flowchart for describing status determination processingperformed by the inspection apparatus 200 according to the thirdembodiment. The processing described in this flowchart is realized bythe CPU 515 of the control unit 503 executing programs stored in thememory unit 504. At this time, the CPU 515 functions as the statusdetermination module 514 illustrated in FIG. 16 .

First, in step S1701, the status determination module 514 removes amaximum value and a minimum value of RGB values of a noise amount ineach of the four corner regions of the print output sheet 410 read outby the inspection sensor 403. The processing then proceeds to stepS1702, where the status determination module 514 determines whether theprocessing of step S1701 is complete for all regions. If not complete,step S1701 is repeated, but if complete, the processing proceeds to stepS1703. In step S1703, the status determination module 514 calculates avariance value of the noise amount in all four corner regions. Here, ofthe RGB values, R will be used as an example. Taking the total number ofpixels from which the maximum value and the minimum value of R have beenremoved in step S1701 as n, a variance value S² is obtained through thefollowing Formula (3), using each pixel value xi and an average of thepixel values xi.

$\begin{matrix}{S^{2} = {\frac{1}{n}{\sum}_{n = 1}^{n}\left( {x_{i} - \overset{\_}{x}} \right)^{2}}} & {{Formula}(3)}\end{matrix}$

Obtaining this value for G and B in the same manner makes it possible tocalculate all the variance values of the RGB values.

Although the third embodiment takes into account the processing speedand sets the regions to be read by the inspection sensor to the fourcorners, the present invention is not limited thereto. RGB values ofseveral percent from the maximum value and several percent from theminimum value may be removed from the entire sheet, and the variancevalues may be calculated for the remaining RGB values.

The random number application module 511 changes the random numbers tobe applied based on the variance values calculated by the statusdetermination module 514. Here, the random number map used based on thevariance values may be switched, a standard deviation and a randomnumber map may be generated, or the like. For example, if the thresholdis set to “5” and the calculated variance value exceeds the threshold,the random number map may be switched from the random number map 701illustrated in FIG. 7A to the random number map 702 in which the randomnumbers to be applied are increased, such as that illustrated in FIG.7B.

As described above, according to the third embodiment, the noise amountcan be adjusted taking into account individual differences between printoutput sheets 410, inspection sensors 403, and the like, which makes itpossible to detect defects with higher precision.

Although the third embodiment describes an example in which the randomnumbers to be applied are switched based on individual differencesbetween print output sheets 410, inspection sensors 403, and the like,the present invention is not limited thereto. CMYK tones may be read outand the random numbers may be changed by taking into account thecharacteristics, status, and so on of the scanner, the printer, and thelike of the image forming apparatus 100.

OTHER EMBODIMENTS

Embodiments of the present disclosure can also be realized by a computerof a system or apparatus that reads out and executes computer executableinstructions (e.g., one or more programs) recorded on a storage medium(which may also be referred to more fully as a ‘non-transitorycomputer-readable storage medium’) to perform the functions of one ormore of the above-described embodiments and/or that includes one or morecircuits (e.g., application specific integrated circuit (ASIC)) forperforming the functions of one or more of the above-describedembodiments, and by a method performed by the computer of the system orapparatus by, for example, reading out and executing the computerexecutable instructions from the storage medium to perform the functionsof one or more of the above-described embodiments and/or controlling theone or more circuits to perform the functions of one or more of theabove-described embodiments. The computer may comprise one or moreprocessors (e.g., central processing unit (CPU), micro processing unit(MPU)) and may include a network of separate computers or separateprocessors to read out and execute the computer executable instructions.The computer executable instructions may be provided to the computer,for example, from a network or the storage medium. The storage mediummay include, for example, one or more of a hard disk, a random-accessmemory (RAM), a read only memory (ROM), a storage of distributedcomputing systems, an optical disk (such as a compact disc (CD), digitalversatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, amemory card, and the like.

While the present disclosure includes exemplary embodiments, it is to beunderstood that the disclosure is not limited to the disclosed exemplaryembodiments. The scope of the following claims is to be accorded thebroadest interpretation so as to encompass all such modifications andequivalent structures and functions.

This application claims the benefit of Japanese Patent Application No.2022-093097, filed Jun. 8, 2022 which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. An inspection apparatus that inspects an imageformed on a recording medium by a printing apparatus, the inspectionapparatus comprising: one or more controllers including one or moreprocessors and one or more memories, the one or more controllers beingconfigured to: store, as a reference image, image data used to form animage on the recording medium; obtain target image data to be inspected,by reading an image to be inspected formed on the recording medium;apply noise components to the reference image; align the reference imageto which the noise components have been applied with the target imagedata; and perform collation processing between the reference image andthe target image data that have been aligned.
 2. The inspectionapparatus according to claim 1, wherein the noise components includerandom numbers, and, in the applying, the reference image is dividedinto a plurality of regions and a random number pattern of the randomnumbers is applied to each of the plurality of regions.
 3. Theinspection apparatus according to claim 2, wherein, in the applying, theone or more controllers are configured to apply the random numberpattern based on a pixel value in the reference image.
 4. The inspectionapparatus according to claim 3, wherein, in the applying, the one ormore controllers are configured to apply the random number pattern ofhigher random numbers when the pixel value in the reference imageindicates a bright part than when the pixel value in the reference imageindicates a dark part.
 5. The inspection apparatus according to claim 1,wherein, in the applying, the one or more controllers are configured toapply the noise components for reducing a difference between thereference image and the target image data, the difference being causedby a noise component present in the target image data.
 6. The inspectionapparatus according to claim 1, wherein the one or more controllers arefurther configured to obtain a variance in pixel values obtained byoptically reading a recording medium on which no image is formed, and inthe applying, the one or more controllers are configured to change thenoise components based on the variance.
 7. The inspection apparatusaccording to claim 1, wherein the one or more controllers are furtherconfigured to set a threshold for determining whether or not a defect ispresent in the target image data based on the collation processing. 8.The inspection apparatus according to claim 7, wherein, in the applying,the one or more controllers are configured to change the noisecomponents based on the set threshold.
 9. The inspection apparatusaccording to claim 8, wherein, in the applying, the one or morecontrollers are configured to increase the noise components when thethreshold increases and reduce the noise components when the thresholddecreases.
 10. The inspection apparatus according to claim 1, whereinthe one or more controllers are further configured to convert a colorspace of the reference image to a color space of the target image data.11. The inspection apparatus according to claim 1, wherein, in thealigning, the one or more controllers are configured to perform thealigning by performing a proximity search using block matching between asearch window set in the target image data and a predetermined region ofthe reference image to which the noise components have been added, andselecting a block in which a difference between pixel values is minimum.12. The inspection apparatus according to claim 1, wherein the one ormore controllers are further configured to convert a resolution of thereference image or the target image data such that the resolution of thereference image and the resolution of the target image data are thesame.
 13. An inspection apparatus that inspects an image formed on arecording medium by a printing apparatus, the inspection apparatuscomprising: one or more controllers including one or more processors andone or more memories, the one or more controllers being configured to:store, as a reference image, image data obtained by scanning an imageformed on the recording medium; obtain target image data to beinspected, the image data being obtained by scanning an image to beinspected formed on the recording medium; align the reference image andthe target image data; and perform collation processing between thereference image and the target image data that have been aligned. 14.The inspection apparatus according to claim 13, wherein, in thealigning, the one or more controllers are configured to perform thealigning by performing a proximity search using block matching between asearch window set in the target image data and a predetermined region ofthe reference image, and selecting a block in which a difference betweenpixel values is minimum.
 15. The inspection apparatus according to claim13, wherein the one or more controllers are further configured to set athreshold for determining whether or not a defect is present in thetarget image data based on the collation processing.
 16. The inspectionapparatus according to claim 13, wherein the one or more controllers arefurther configured to convert a resolution of the reference image or thetarget image data such that the resolution of the reference image andthe resolution of the target image data are the same.
 17. A method ofcontrolling an inspection apparatus that inspects an image formed on arecording medium by a printing apparatus, the method comprising:storing, as a reference image, image data used to form an image on therecording medium; obtaining image data to be inspected, by opticallyreading the image formed on the recording medium; applying noisecomponents to the reference image; aligning the reference image to whichthe noise components have been applied with the target image data; andperforming collation processing between the reference image and thetarget image data that have been aligned.
 18. A method of controlling aninspection apparatus that inspects an image formed on a recording mediumby a printing apparatus, the method comprising: storing, as a referenceimage, image data obtained by scanning an image formed on the recordingmedium; obtaining target image data to be inspected, the image databeing obtained by scanning an image to be inspected formed on therecording medium; aligning the reference image and the target imagedata; and performing collation processing between the reference imageand the target image data that have been aligned.
 19. A non-transitorycomputer-readable storage medium storing a program for causing aprocessor to execute a method of controlling an inspection apparatusthat inspects an image formed on a recording medium by a printingapparatus, the method comprising: storing, as a reference image, imagedata used to form an image on the recording medium; obtaining image datato be inspected, by optically reading the image formed on the recordingmedium; applying noise components to the reference image; aligning thereference image to which the noise components have been applied with thetarget image data; and performing collation processing between thereference image and the target image data that have been aligned.
 20. Anon-transitory computer-readable storage medium storing a program forcausing a processor to execute a method of controlling an inspectionapparatus that inspects an image formed on a recording medium by aprinting apparatus, the method comprising: storing, as a referenceimage, image data obtained by scanning an image formed on the recordingmedium; obtaining target image data to be inspected, the image databeing obtained by scanning an image to be inspected formed on therecording medium; aligning the reference image and the target imagedata; and performing collation processing between the reference imageand the target image data that have been aligned.